package net.realsee.common.exception.ccs;

import cn.hutool.core.util.StrUtil;
import net.realsee.gcl.domain.bo.ccs.GclCcsOperateResult;

/**
 * 协鑫CCS异常
 *
 * @author 孙正华
 * @since 2023/9/12 13:52
 */
public class GclCcsTaskException extends RuntimeException {

    private final String errorMessage;
    private final GclCcsOperateResult data;

    public GclCcsTaskException(String message, GclCcsOperateResult data) {
        this.errorMessage = message;
        this.data = data;
    }

    public GclCcsTaskException(GclCcsOperateResult data) {
        this.errorMessage = StrUtil.EMPTY;
        this.data = data;
    }

    public GclCcsTaskException(String message) {
        this.errorMessage = message;
        this.data = null;
    }

    public GclCcsOperateResult getData() {
        return data;
    }

    public String getErrorMessage() {
        return errorMessage;
    }
}
